how to copy the contents of file into another file